/**
 * @Author: 焦质晔
 * @Date: 2019/6/20
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2019-09-24 15:57:13
 */
import axios from '@/api/fetch';
import * as types from './types';
import SERVER from '@/api/server';
//  获取所有活动
export const getActivityList = params => axios.post(`${SERVER.INFORMATION}/activityInfo/pageQuery`, {  page:params.pageNum, ...params });
//  保存活动信息
export const saveActivity = params => axios.post(`${SERVER.INFORMATION}/activityInfo/saveFromPc`, params);
//  删除活动
export const delActivity = id => axios.post(`${SERVER.INFORMATION}/activityInfo/delete?id=${id}`);
//  查看报名情况
export const checkSign = id => axios.get(`${SERVER.INFORMATION}/activitySign/queryActivitySignVOS?activityId=${id}`);
//  发布活动
export const publishActivity = id => axios.post(`${SERVER.INFORMATION}/activityInfo/publish?id=${id}`);
//  下架活动
export const offActivity = id => axios.post(`${SERVER.INFORMATION}/activityInfo/off?id=${id}`);
//  停止报名
export const stopSign = id => axios.post(`${SERVER.INFORMATION}/activityInfo/stopSign?id=${id}`);
//  获取活动详情
export const activityDetail = id => axios.get(`${SERVER.INFORMATION}/activityInfo/detail?id=${id}`);
// 获取车型数据
// export const getAllModal = appId => axios.get(`${SERVER.BASEDATA}/vehicleProduct/open/getAllModel?appId=${appId}`);
export const getAllModal = (id, params) => axios.get(`${SERVER.BASEDATA}/vehicleProduct/productInfo/productTree?isUnlimited=10041001`, {params:{ type:id ,level: 5, ...params}} );


